home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #14
/
Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO
/
prog_bas
/
basicos2.zip
/
DECTOHEX.BAS
< prev
next >
Wrap
BASIC Source File
|
1996-02-12
|
413b
|
10 lines
10 input "Enter a number to convert to a 4-byte hex value: " ,IN$
20 I =val (IN$ ):HIBYTE =int (I /256 ):lobyte =I -HIBYTE *256
30 HIHI =int (HIBYTE /16 ):HILO =HIBYTE -HIHI *16
40 LOHI =int (LOBYTE /16 ):LOLO =LOBYTE -LOHI *16
50 V =HIHI :gosub 200 :V =HILO :gosub 200
60 V =LOHI :gosub 200 :V =LOLO :gosub 200
70 end
200 if V <10 then print V ;:return
210 print chr$ (asc("A") +V -10 );:return